import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/user/login.vue')
  },
  // {
  //   path: '/layout',
  //   name: 'layout',
  //   component: () => import('../components/layout/index.vue'),
  //   children: [
      // {
      //   path: '/home',
      //   name: 'home',
      //   component: () => import('../views/home/index.vue')
      // },

      // // 系统管理
      // {
      //   path: '/system/user',
      //   name: 'system-user',
      //   component: () => import('../views/system/user.vue')
      // },
      // {
      //   path: '/system/role',
      //   name: 'system-role',
      //   component: () => import('../views/system/role.vue')
      // },
      // {
      //   path: '/system/menu',
      //   name: 'system-menu',
      //   component: () => import('../views/system/menu.vue')
      // }
    // ]
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  scrollBehavior: () => ({ y: 0 }),
  routes
});

export default router;
